package com.lx.chong.service;

import com.lx.chong.dto.PageAndSortDto;
import com.lx.chong.model.Department;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author chong
 * @create 2019/5/15
 * Desc: 部门
 */
public interface DepartmentService {

    /**
     * 获取部门下拉
     * @return
     */
    List<Department> findAllByIfDeleteAndUseMark();

    /**
     * 根据id获取对象
     * @param id
     * @return
     */
    Department findOne(Long id);

    /**
     * 保存
     * @param department
     * @return
     */
    Department save(Department department);

    /**
     * 分页获取部门
     * @param page
     * @param size
     * @return
     */
    List<Department> getDepListPage(Integer page,Integer size);


    Long getDepCount();

    /**
     * 分页获取部门数据
     * @param dto
     * @return
     */
    Page<Department> getDepListPage(PageAndSortDto dto);
}
